define(['text!../tmpl/auth.html', 'backbone', 'underscore'], function(tmpl, Backbone, _) {
  var AppView = Backbone.View.extend({
    el: '#sign-in-container',
    template: _.template(tmpl),
    events: {
      'click #authorize-button': 'auth'
    },
    initialize: function(app) {
      this.app = app;
    },
    render: function() {
      this.$el.html(this.template());
      return this;
    },
    auth: function() {
      this.app.apiManager.auth();
    }
  })

  return AppView;
})